from threading import Timer
import datetime

def printHello():
    print('TimeNow:%s' % (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
    t = Timer(2,printHello)
    t.start()

if __name__ =='__main__':
    printHello()

